<template>
  <div v-show="show" class="loading">
    <div class="gif">
      <div class='loader loader1'>
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="word">{{text}}</div>
  </div>
</template>

<script>
export default {
  name: 'Loading',
};
</script>

<style lang="postcss" scoped>
.loading {
  position: fixed;
  z-index: 20;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0,0,0,.7);
  color: #fff;
}

.gif {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.loader {
  box-sizing: border-box;
  position: relative;
  margin: 75px auto;
  width: 150px;
  height: 150px;
  display: block;
  overflow: hidden;
}
.loader div {
  height: 100%;
  box-sizing: border-box;
}
.loader1, .loader1 div {
  border-radius: 50%;
  padding: 8px;
  border: 2px solid transparent;
  animation: rotate linear 3.5s infinite;
  border-top-color: #00D2C1;
  border-bottom-color: #03a9f4;
}
.loader, .loader * {
  will-change: transform;
}

@-webkit-keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
</style>
